<?php $this->load('header')?>

<?php $this->showTabs() ?>

<div class="main">

<form name="update" method="post" action="<?php echo URL('link.category')?>">
		<table class="datalist" cellspacing="0" id="link_list">
			<tr>
				<th width="50" class="firstcol">ID</th>
				<th width="200">组名</th>
				<th width="100">排序</th>
				<th width="100">链接数量</th>
				<th width="100">操作</th>
				<th>&nbsp;</th>
			</tr>
			<?php foreach ($result as $row) { ?>
			<tr id="linkgroup_<?php echo $row['id']?>">
				<td align="center"><?php echo $row['id']?></td>
				<td><input type="text" name="catename[<?php echo $row['id']?>]" value="<?php echo $row['catename']?>" /></td>
				<td align="center"><input type="text" name="orderid[<?php echo $row['id']?>]" value="<?php echo $row['orderid']?>" size="5" /></td>
				<td align="center"><a href="?mod=link&cid=<?php echo $row['id']?>"><b style="color:green"><?php echo $row['count']?></b></a></td>
				<td align="center"><a href="?mod=link&ac=delcate&id=<?php echo $row['id']?>" >删除</a></td>
				<td>&nbsp;</td>
			</tr>
			<?php }?>
			<tr>
				<td align="center">新增</td>
				<td><input type="text" name="newname" value="" /></td>
				<td align="center"><input type="text" name="neworderid" value="0" size="5" /></td>
				<td colspan="5">&nbsp;</td>
			</tr>
			<tr>
				<td colspan="10"><input type="submit" class="button" name="s" value="更新分类" /></td>
			</tr>
		</table>
	</form>

</div>

<?php $this->load('footer')?>